import { post } from '@/core/utils/http';
import type { Response, NoticeType, ArticleClassifyType } from '@/core/models';

/** 获取文章分类 */
export const queryArticleClassify = () : Promise<Response<Array<ArticleClassifyType>>> => {
	return post('Api/Article/GetArticleClassify', {});
}

/** 获取文章列表 */
export const queryArticleList = (data : any) : Promise<Response<Array<any>>> => {
	return post('Api/Article/GetArticleList', { data, });
}

/** 获取文章详情 */
export const queryArticleDetail = (data : any) : Promise<Response<any>> => {
	return post('Api/Article/GetArticleDetail', { data, });
}

/**  获取公告列表 */
export const queryNoticeList = (data : any) : Promise<Response<Array<NoticeType>>> => {
	return post('Api/Notice/NoticeList', {
		data,
	});
}

/**  获取公告详情 */
export const queryNoticeInfo = (data : any) : Promise<Response<NoticeType>> => {
	return post('Api/Notice/NoticeInfo', {
		data,
	});
}

/**  获取图文消息 */
export const queryMessageDetil = (data : any) : Promise<Response<NoticeType>> => {
	return post('Api/Articles/GetWeChatMessage', {
		data,
	});
}